home *** CD-ROM | disk | FTP | other *** search
XSetup plugin | 2001-08-28 | 2.1 KB | 75 lines |
- "FILE"="Xteq Systems X-Setup Plugin 6.0"
- "TYPE"="6"
- "COUNT"="2"
- "UIPATH 1"="Appearance\Files&Folders\Folders Context Menu"
- "UIPATH 2"="Appearance\Files&Folders\Drives"
- "NAME"="Print Contents Context Menu"
- "VERSION"="1.02"
- "LANGUAGE"="VBScript"
- "TEXT 1"="Enable "Print Contents" command for directories"
- "TEXT 2"="Enable "Print Contents" command for drive root"
- "DESCRIPTION 1"="This option lets you add a "Print Contents" option to the context menus of folders and drive root folders respectively."
- "AUTHOR"="Xteq Systems (CptSiskoX)"
- "CONTACTURL"="http://www.xteq.com"
- "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
- "COMMENT 1"="Should print DIR list contents of selected folder/drive root."
-
-
- sName="Print Contents"
-
- sP1_A="HKCR\Directory\Shell\PrintHere"
- sP1_B="HKCR\Directory\Shell\PrintHere\Command"
-
- sP2_A="HKCR\Drive\Shell\PrintHere"
- sP2_B="HKCR\Drive\Shell\PrintHere\Command"
-
- Sub Plugin_Initialize
- s=RegReadValue(sP1_B & "\@")
- if Len(s)>0 then
- SetUIElement 1,true
- end if
-
- s=RegReadValue(sP2_B & "\@")
- if Len(s)>0 then
- SetUIElement 2,true
- end if
- End Sub
-
- Sub Plugin_Apply(ElementIndex,ElementSubIndex)
- s=BuildCommandString
-
- if GetUIElement(1)=true then
- Call RegWriteValue(sp1_A & "\@",sName,1)
- Call RegWriteValue(sp1_B & "\@",s,1)
- else 'Disable it!
- if RegPathExists(sP1_B) then Call RegDeletePath(sP1_B)
- if RegPathExists(sP1_A) then Call RegDeletePath(sP1_A)
- end if
-
- if GetUIElement(2)=true then
- Call RegWriteValue(sp2_A & "\@",sName,1)
- Call RegWriteValue(sp2_B & "\@",s,1)
- else 'Disable it!
- if RegPathExists(sP2_B) then Call RegDeletePath(sP2_B)
- if RegPathExists(sP2_A) then Call RegDeletePath(sP2_A)
- end if
-
-
- End Sub
-
- Sub Plugin_Terminate
- End Sub
-
- Function BuildCommandString
- csVer=GetWinVer
- if csVer=1 or csVer=3 or csVer=5 then 'Windows 95/98/ME
- csPath=GetWinDir
- csPath=csPath & "command.com /c dir /a ""%1"" > lpt1"
- else 'NT/2K/XP
- csPath=GetWinSysDir
- csPath=csPath & "cmd.exe /c dir /a ""%1"" > lpt1"
- end if
-
- BuildCommandString=csPath
- End Function
-